package com.hmy.contract.commons.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author seven.qi 齐胜南
 * @version 1.0
 * @description
 * @date 2023/12/25 10:27
 */
@Getter
@AllArgsConstructor
public enum ContractBusinessTypeEnum {

    ENTRY_FORM_ELECTRONIC_CONTRACT(11, "进场单电子合同"),

    ENTRY_FORM_PAPER_CONTRACT(12, "进场单纸质合同"),
    EXIT_FORM_ELECTRONIC_CONTRACT(13, "退场单电子合同"),
    EXIT_FORM_PAPER_CONTRACT(15, "退场单纸质合同"),
    SALE_ELECTRONIC_CONTRACT(16, "销售电子合同"),
    SALE_PAPER_CONTRACT(17, "销售纸质合同"),
    STATEMENT_OF_ACCOUNT_ELECTRONIC_CONTRACT(18, "对账单电子合同"),
    SUPPLY_ELECTRONIC_CONTRACT(19, "增补协议电子合同"),
    SUPPLY_PAPER_CONTRACT(20, "增补协议纸质合同"),
    ;

    private final Integer type;

    private final String typeDesc;

    public static String getDescByType(Integer type) {
        for (ContractBusinessTypeEnum contractTypeEnum : ContractBusinessTypeEnum.values()) {
            if (contractTypeEnum.getType().intValue() == type) {
                return contractTypeEnum.getTypeDesc();
            }
        }
        return null;
    }
}
